package com.ruoyi.system.service;

import com.ruoyi.system.domain.MaterialThree;
import com.ruoyi.system.domain.MaterialTwo;
import com.ruoyi.system.domain.PickCondition;
import org.apache.ibatis.annotations.Param;
import org.apache.poi.ss.usermodel.Workbook;

import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 材料Service接口
 * 
 * @author ruoyi
 * @date 2020-12-16
 */
public interface IWatehouseMaterialService
{

    /**
     * 查询项目材料明细记录
     *
     * @param material 材料
     * @return 材料集合
     */
    public List<MaterialTwo> selectMaterialList(MaterialTwo material, Integer pid);
    /** @Description:
    * @Param:
    * @returns:
    * @Author: Administrator
    * @Date: 2020/12/22 16:25
    **/
    public List<MaterialTwo> selectWarehousematerialBywid(MaterialTwo material, long wid);
    public List<MaterialTwo> selectMaterialListall(MaterialTwo material);
    /** @Description:  
    * @Param: [mid] 
    * @returns: com.ruoyi.system.domain.MaterialTwo 
    * @Author: Administrator
    * @Date: 2020/12/22 19:05
    **/
    
    public MaterialTwo selectaterialByid(@Param("mid") long mid);

    /** @Description: 修改仓库
     * @Param: [wid]
     * @returns: int
     * @Author: Administrator
     * @Date: 2020/12/22 18:48
     **/

    public int updateMaterial(MaterialTwo materialTwo, Long wid);

    /**
     * 新增材料
     *
     * @param material 材料
     * @return 结果
     */
    public int insertMaterial(MaterialThree material, long wid);
    /**
     * 删除材料
     *
     * @param mId 材料ID
     * @return 结果
     */
    public int deleteMaterialById(long wid,Long mId);

    //返回所有单位
    List<String> reunits();

    //返回所有某一个仓库的所有某种材料
    List<PickCondition> selectMatById(HashMap<String, Object> map);

    //入库
    boolean watehousing(PickCondition pickCondition);

    //出库
    boolean outWatehouse(PickCondition pickCondition) throws Exception;

    List<String> reproname();
    List<MaterialThree> queryMaterialList(MaterialThree MaterialThree);
    public Workbook exportMoreSheetByTemplate(String date) throws IOException;
    public Workbook exportByTemplate(String date) throws IOException;
      void upload();
}
